package com.guigu.controller;

import com.guigu.OrderDetailsService;
import com.guigu.pojo.OrderDetails;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("OrderDetails")
public class OrderDetailsController {
    @Autowired
    private OrderDetailsService orderDetailsService;
    @PostMapping("/insert")
        public String insert(@RequestBody OrderDetails orderDetails){
        int i = orderDetailsService.insert(orderDetails);
            if(i>0){
                return "ok";
            }else{
                return "no";
            }
        }
}
